Cleanup: Make local functions static and remove unused functions.
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 30 Sep 2009 07:43:34 +0000 (08:43 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 30 Sep 2009 07:43:34 +0000 (08:43 +0100)
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
28 files changed:
xen/arch/x86/apic.c
xen/arch/x86/cpu/intel.c
xen/arch/x86/cpu/mcheck/amd_nonfatal.c
xen/arch/x86/cpu/mcheck/mce_intel.c
xen/arch/x86/genapic/x2apic.c
xen/arch/x86/hvm/i8254.c
xen/arch/x86/hvm/io.c
xen/arch/x86/hvm/vlapic.c
xen/arch/x86/io_apic.c
xen/arch/x86/ioport_emulate.c
xen/arch/x86/irq.c
xen/arch/x86/mm/hap/guest_walk.c
xen/arch/x86/mm/hap/hap.c
xen/arch/x86/mm/p2m.c
xen/arch/x86/mm/paging.c
xen/arch/x86/traps.c
xen/arch/x86/x86_emulate/x86_emulate.c
xen/common/sched_credit.c
xen/crypto/vmac.c
xen/drivers/char/console.c
xen/drivers/passthrough/amd/iommu_detect.c
xen/drivers/passthrough/amd/iommu_init.c
xen/drivers/passthrough/amd/iommu_map.c
xen/drivers/passthrough/vtd/intremap.c
xen/drivers/passthrough/vtd/iommu.c
xen/drivers/passthrough/vtd/qinval.c
xen/include/asm-x86/msi.h
xen/include/xen/xenoprof.h

index a590bdfef82bd443567122fa48cf622d60bd6adb..cfcd621a044ed6650a561b508ce244088c0441e6 100644 (file)
@@ -52,7 +52,7 @@ int x2apic_enabled __read_mostly = 0;
 
 static void apic_pm_activate(void);
 
-int modern_apic(void)
+static int modern_apic(void)
 {
     unsigned int lvr, version;
     /* AMD systems use old APIC versions, so check the CPU */
@@ -995,7 +995,7 @@ void (*wait_timer_tick)(void) __initdata = wait_8254_wraparound;
 
 #define APIC_DIVISOR 1
 
-void __setup_APIC_LVTT(unsigned int clocks)
+static void __setup_APIC_LVTT(unsigned int clocks)
 {
     unsigned int lvtt_value, tmp_value, ver;
 
@@ -1033,7 +1033,7 @@ static void __devinit setup_APIC_timer(unsigned int clocks)
  * APIC irq that way.
  */
 
-int __init calibrate_APIC_clock(void)
+static int __init calibrate_APIC_clock(void)
 {
     unsigned long long t1 = 0, t2 = 0;
     long tt1, tt2;
@@ -1107,11 +1107,6 @@ int __init calibrate_APIC_clock(void)
     return result;
 }
 
-u32 get_apic_bus_cycle(void)
-{
-    return bus_cycle;
-}
-
 static unsigned int calibration_result;
 
 void __init setup_boot_APIC_clock(void)
index b88a4a1b988d7291d21040cb5d6b365f5f29ad24..b9dd35a1cbec17fa09715ecf07189af206bef8e6 100644 (file)
@@ -68,26 +68,6 @@ void __devinit early_intel_workaround(struct cpuinfo_x86 *c)
                c->x86_cache_alignment = 128;
 }
 
-/*
- *     Early probe support logic for ppro memory erratum #50
- *
- *     This is called before we do cpu ident work
- */
-int __devinit ppro_with_ram_bug(void)
-{
-       /* Uses data from early_cpu_detect now */
-       if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL &&
-           boot_cpu_data.x86 == 6 &&
-           boot_cpu_data.x86_model == 1 &&
-           boot_cpu_data.x86_mask < 8) {
-               printk(KERN_INFO "Pentium Pro with Errata#50 detected. Taking evasive action.\n");
-               return 1;
-       }
-       return 0;
-}
-       
-
 /*
  * P4 Xeon errata 037 workaround.
  * Hardware prefetcher may cause stale data to be loaded into the cache.
index 9bec5de8dc028c9304844d05315150a4822ffe85..f2fedcd29971bcc44b31c7ad0167a37fbd7bc8c2 100644 (file)
@@ -80,7 +80,7 @@ static int variable_period = 1;
  * Collects information of correctable errors and notifies
  * Dom0 via an event.
  */
-void mce_amd_checkregs(void *info)
+static void mce_amd_checkregs(void *info)
 {
        mctelem_cookie_t mctc;
        struct mca_summary bs;
index 4b86451ce2d05769cb7d80c2ed247c1d65f565fb..03160b48f8af242344b0049a11462a6fc0bd3151 100644 (file)
@@ -329,7 +329,7 @@ static int inject_mce(struct domain *d)
     return 0;
 }
 
-void intel_UCR_handler(struct mcinfo_bank *bank,
+static void intel_UCR_handler(struct mcinfo_bank *bank,
              struct mcinfo_global *global,
              struct mcinfo_extended *extension,
              struct mca_handle_result *result)
index c57a66eeac634c7393af1ec27675abeaf50623ba..f76cf945d9f765364285b3e8b5c6114eed9e063a 100644 (file)
@@ -29,13 +29,13 @@ boolean_param("x2apic", x2apic);
 static int x2apic_phys = 0; /* By default we use logical cluster mode. */
 boolean_param("x2apic_phys", x2apic_phys);
 
-__init int probe_x2apic_phys(void)
+static int __init probe_x2apic_phys(void)
 {
     return x2apic && x2apic_phys && x2apic_is_available() &&
         iommu_supports_eim();
 }
 
-__init int probe_x2apic_cluster(void)
+static int __init probe_x2apic_cluster(void)
 {
     return x2apic && !x2apic_phys && x2apic_is_available() &&
         iommu_supports_eim();
index 50c5493eb5006e02fea9ec4f4c72405991cb0015..702a84364091338709951bc1fefa458d5a6c85f8 100644 (file)
@@ -151,7 +151,7 @@ static void pit_set_gate(PITState *pit, int channel, int val)
     s->gate = val;
 }
 
-int pit_get_gate(PITState *pit, int channel)
+static int pit_get_gate(PITState *pit, int channel)
 {
     ASSERT(spin_is_locked(&pit->lock));
     return pit->hw.channels[channel].gate;
index 0d7f5ffa6b3cdc2c637b52ffac194accb3705fb4..42a7b63b9803c70382b375c14a4558b810fc6616 100644 (file)
@@ -244,7 +244,7 @@ void hvm_io_assist(void)
         vcpu_end_shutdown_deferral(curr);
 }
 
-void dpci_ioport_read(uint32_t mport, ioreq_t *p)
+static void dpci_ioport_read(uint32_t mport, ioreq_t *p)
 {
     int i, sign = p->df ? -1 : 1;
     uint32_t data = 0;
@@ -274,7 +274,7 @@ void dpci_ioport_read(uint32_t mport, ioreq_t *p)
     }
 }
 
-void dpci_ioport_write(uint32_t mport, ioreq_t *p)
+static void dpci_ioport_write(uint32_t mport, ioreq_t *p)
 {
     int i, sign = p->df ? -1 : 1;
     uint32_t data;
index bdd2473a18e1d732ae9722b6c247d0bd7215f547..476b39569d2aa2ee8ee03d42a34b9be0b6f31fb7 100644 (file)
@@ -146,7 +146,7 @@ static int vlapic_find_highest_isr(struct vlapic *vlapic)
     return vlapic_find_highest_vector(&vlapic->regs->data[APIC_ISR]);
 }
 
-uint32_t vlapic_get_ppr(struct vlapic *vlapic)
+static uint32_t vlapic_get_ppr(struct vlapic *vlapic)
 {
     uint32_t tpr, isrv, ppr;
     int isr;
@@ -531,7 +531,7 @@ static int vlapic_read(
     return X86EMUL_OKAY;
 }
 
-void vlapic_pt_cb(struct vcpu *v, void *data)
+static void vlapic_pt_cb(struct vcpu *v, void *data)
 {
     *(s_time_t *)data = hvm_get_guest_time(v);
 }
index 47f324c276b484cd4da27b4a6613b107dd36d68c..265e40fc3332ee79694dd9a77b8c0386a3019b8a 100644 (file)
@@ -911,7 +911,7 @@ static inline void UNEXPECTED_IO_APIC(void)
 {
 }
 
-void /*__init*/ __print_IO_APIC(void)
+static void /*__init*/ __print_IO_APIC(void)
 {
     int apic, i;
     union IO_APIC_reg_00 reg_00;
@@ -2105,7 +2105,7 @@ static int ioapic_physbase_to_id(unsigned long physbase)
 
 unsigned apic_gsi_base(int apic);
 
-int apic_pin_2_gsi_irq(int apic, int pin)
+static int apic_pin_2_gsi_irq(int apic, int pin)
 {
     int idx, irq;
 
index 64377533cfdca2be6b8d82f877c7237af74cc7db..d76f1ea5679455bc9d9afe17acd0e74499d522e0 100644 (file)
@@ -42,7 +42,7 @@ static void ioemul_handle_proliant_quirk(
     io_emul_stub[9] = 0xc3;
 }
 
-int __init proliant_quirk(struct dmi_system_id *d)
+static int __init proliant_quirk(struct dmi_system_id *d)
 {
     ioemul_handle_quirk = ioemul_handle_proliant_quirk;
     return 0;
@@ -121,7 +121,7 @@ static struct dmi_system_id __initdata ioport_quirks_tbl[] = {
     { }
 };
 
-int __init ioport_quirks_init(void)
+static int __init ioport_quirks_init(void)
 {
     dmi_check_system(ioport_quirks_tbl);
     return 0;
index b780d03ed8e197605a4689a9ba77a0bf916ac4b7..2ca28ac28164446968d73a2b2c6141594d50aca0 100644 (file)
@@ -147,7 +147,7 @@ out:
     return irq;
 }
 
-void dynamic_irq_cleanup(unsigned int irq)
+static void dynamic_irq_cleanup(unsigned int irq)
 {
     struct irq_desc *desc = irq_to_desc(irq);
     unsigned long flags;
index 425031508dd19b5fa0e216ab0eeb5ebc2304f21a..0ad2ec837074bd4f2a4e811149ccefe2c8380d93 100644 (file)
@@ -24,6 +24,7 @@
 #include <xen/paging.h>
 #include <xen/config.h>
 #include <xen/sched.h>
+#include "private.h" /* for hap_gva_to_gfn_* */
 
 #define _hap_gva_to_gfn(levels) hap_gva_to_gfn_##levels##level
 #define hap_gva_to_gfn(levels) _hap_gva_to_gfn(levels)
index 74993ee0ad3dead306e0afef5fd7d20afb039644..bcbda3b70318decfe4bc09c676e956b09ffc767e 100644 (file)
@@ -55,7 +55,7 @@
 /*          HAP VRAM TRACKING SUPPORT           */
 /************************************************/
 
-int hap_enable_vram_tracking(struct domain *d)
+static int hap_enable_vram_tracking(struct domain *d)
 {
     int i;
     struct sh_dirty_vram *dirty_vram = d->arch.hvm_domain.dirty_vram;
@@ -76,7 +76,7 @@ int hap_enable_vram_tracking(struct domain *d)
     return 0;
 }
 
-int hap_disable_vram_tracking(struct domain *d)
+static int hap_disable_vram_tracking(struct domain *d)
 {
     int i;
     struct sh_dirty_vram *dirty_vram = d->arch.hvm_domain.dirty_vram;
@@ -96,7 +96,7 @@ int hap_disable_vram_tracking(struct domain *d)
     return 0;
 }
 
-void hap_clean_vram_tracking(struct domain *d)
+static void hap_clean_vram_tracking(struct domain *d)
 {
     int i;
     struct sh_dirty_vram *dirty_vram = d->arch.hvm_domain.dirty_vram;
@@ -111,7 +111,7 @@ void hap_clean_vram_tracking(struct domain *d)
     flush_tlb_mask(&d->domain_dirty_cpumask);
 }
 
-void hap_vram_tracking_init(struct domain *d)
+static void hap_vram_tracking_init(struct domain *d)
 {
     paging_log_dirty_init(d, hap_enable_vram_tracking,
                           hap_disable_vram_tracking,
@@ -192,7 +192,7 @@ param_fail:
 /************************************************/
 
 /* hap code to call when log_dirty is enable. return 0 if no problem found. */
-int hap_enable_log_dirty(struct domain *d)
+static int hap_enable_log_dirty(struct domain *d)
 {
     /* turn on PG_log_dirty bit in paging mode */
     hap_lock(d);
@@ -205,7 +205,7 @@ int hap_enable_log_dirty(struct domain *d)
     return 0;
 }
 
-int hap_disable_log_dirty(struct domain *d)
+static int hap_disable_log_dirty(struct domain *d)
 {
     hap_lock(d);
     d->arch.paging.mode &= ~PG_log_dirty;
@@ -216,7 +216,7 @@ int hap_disable_log_dirty(struct domain *d)
     return 0;
 }
 
-void hap_clean_dirty_bitmap(struct domain *d)
+static void hap_clean_dirty_bitmap(struct domain *d)
 {
     /* set l1e entries of P2M table to be read-only. */
     p2m_change_entry_type_global(d, p2m_ram_rw, p2m_ram_logdirty);
@@ -312,7 +312,7 @@ static struct page_info *hap_alloc_p2m_page(struct domain *d)
     return pg;
 }
 
-void hap_free_p2m_page(struct domain *d, struct page_info *pg)
+static void hap_free_p2m_page(struct domain *d, struct page_info *pg)
 {
     hap_lock(d);
     ASSERT(page_get_owner(pg) == d);
index dfbd3fa781e570640d514c22ee4ac8744e1b411c..10021b7102f7ac4d899c030abcbc95e29afc72d5 100644 (file)
@@ -230,7 +230,7 @@ static
 int set_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn, 
                   unsigned int page_order, p2m_type_t p2mt);
 
-int
+static int
 p2m_pod_cache_add(struct domain *d,
                   struct page_info *page,
                   unsigned long order)
index 051c5dc1f2d17510f17dfbae274b9f900ab82d24..94b745f0fd7a7b910cbada6f1cf3c86d2e13d9be 100644 (file)
@@ -626,7 +626,7 @@ void paging_log_dirty_init(struct domain *d,
 }
 
 /* This function fress log dirty bitmap resources. */
-void paging_log_dirty_teardown(struct domain*d)
+static void paging_log_dirty_teardown(struct domain*d)
 {
     log_dirty_lock(d);
     paging_free_log_dirty_bitmap(d);
index e8116afe1c77dee2c73358d0269f672f0d886574..37301feb3a552e0896eea51f960ab513785ea492 100644 (file)
@@ -63,6 +63,7 @@
 #include <asm/x86_emulate.h>
 #include <asm/traps.h>
 #include <asm/hvm/vpt.h>
+#include <asm/hypercall.h>
 #include <public/arch-x86/cpuid.h>
 
 /*
@@ -383,7 +384,7 @@ void vcpu_show_execution_state(struct vcpu *v)
     vcpu_unpause(v);
 }
 
-char *trapstr(int trapnr)
+static char *trapstr(int trapnr)
 {
     static char *strings[] = { 
         "divide error", "debug", "nmi", "bkpt", "overflow", "bounds", 
@@ -2872,7 +2873,7 @@ static void nmi_dom0_report(unsigned int reason_idx)
     send_guest_trap(d, 0, TRAP_nmi);
 }
 
-asmlinkage void mem_parity_error(struct cpu_user_regs *regs)
+static void mem_parity_error(struct cpu_user_regs *regs)
 {
     switch ( opt_nmi[0] )
     {
@@ -2891,7 +2892,7 @@ asmlinkage void mem_parity_error(struct cpu_user_regs *regs)
     outb((inb(0x61) & 0x0b) | 0x00, 0x61); /* enable parity check */
 }
 
-asmlinkage void io_check_error(struct cpu_user_regs *regs)
+static void io_check_error(struct cpu_user_regs *regs)
 {
     switch ( opt_nmi[0] )
     {
index f2dfdf0c19e4ccbea9e362629385d5770ba78a56..3592f0e8f636f6d1bedc74662888c2aae2ae8aa4 100644 (file)
@@ -1183,9 +1183,8 @@ decode_register(
 }
 
 #define decode_segment_failed x86_seg_tr
-enum x86_segment
-decode_segment(
-    uint8_t modrm_reg)
+static enum x86_segment
+decode_segment(uint8_t modrm_reg)
 {
     switch ( modrm_reg )
     {
index a2d79eeb7a9f7a7816d50210a85b2af207301d8d..0e793ccb3fa0ce8ffcc54a1f37d95d8f2292d614 100644 (file)
@@ -211,7 +211,7 @@ __runq_remove(struct csched_vcpu *svc)
     list_del_init(&svc->runq_elem);
 }
 
-void burn_credits(struct csched_vcpu *svc, s_time_t now)
+static void burn_credits(struct csched_vcpu *svc, s_time_t now)
 {
     s_time_t delta;
 
index e5558ba78214416ef7b09b5e5582c5e21e58e822..1e9bafa0ba7ba7b61020149dc150d032a1b75d3c 100644 (file)
@@ -843,62 +843,6 @@ void vhash_update(unsigned char *m,
 
 /* ----------------------------------------------------------------------- */
 
-uint64_t xvhash(unsigned char m[],
-          unsigned int mbytes,
-          uint64_t *tagl,
-          vmac_ctx_t *ctx)
-{
-    uint64_t ch, cl, rh, rl, *mptr;
-    #if (VMAC_TAG_LEN == 128)
-    uint64_t ch2, cl2, rh2, rl2;
-    #endif
-    const uint64_t *kptr = (uint64_t *)ctx->nhkey;
-    int i, remaining;
-
-    remaining = mbytes % VMAC_NHBYTES;
-    i = mbytes-remaining;
-    mptr = (uint64_t *)(m+i);
-    if (i) vhash_update(m,i,ctx);
-
-    ch = ctx->polytmp[0];
-    cl = ctx->polytmp[1];
-    #if (VMAC_TAG_LEN == 128)
-    ch2 = ctx->polytmp[2];
-    cl2 = ctx->polytmp[3];
-    #endif
-
-    if (remaining) {
-        #if (VMAC_TAG_LEN == 128)
-        nh_16_2(mptr,kptr,2*((remaining+15)/16),rh,rl,rh2,rl2);
-        rh2 &= m62;
-        #else
-        nh_16(mptr,kptr,2*((remaining+15)/16),rh,rl);
-        #endif
-        rh &= m62;
-        if (i) {
-            poly_step(ch,cl,ctx->polykey[0],ctx->polykey[1],rh,rl);
-            #if (VMAC_TAG_LEN == 128)
-            poly_step(ch2,cl2,ctx->polykey[2],ctx->polykey[3],rh2,rl2);
-            #endif
-        } else {
-            ADD128(ch,cl,rh,rl);
-            #if (VMAC_TAG_LEN == 128)
-            ADD128(ch2,cl2,rh2,rl2);
-            #endif
-        }
-    }
-
-    #if VMAC_USE_SSE2
-    _mm_empty(); /* SSE2 version of poly_step uses mmx instructions */
-    #endif
-    vhash_abort(ctx);
-    remaining *= 8;
-#if (VMAC_TAG_LEN == 128)
-    *tagl = l3hash(ch2, cl2, ctx->l3key[2], ctx->l3key[3],remaining);
-#endif
-    return l3hash(ch, cl, ctx->l3key[0], ctx->l3key[1],remaining);
-}
-
 uint64_t vhash(unsigned char m[],
           unsigned int mbytes,
           uint64_t *tagl,
index dd615b6732a4ab40a8221bba5f18dcdca60ae524..ca8b02d5c69c5cb2d8364cf7d46ea8dfd0ca468f 100644 (file)
@@ -721,16 +721,6 @@ void console_end_sync(void)
     atomic_dec(&print_everything);
 }
 
-void console_putc(char c)
-{
-    serial_putc(sercon_handle, c);
-}
-
-int console_getc(void)
-{
-    return serial_getc(sercon_handle);
-}
-
 /*
  * printk rate limiting, lifted from Linux.
  *
index 155ca56e1da5c48a583d0968a65d70d34fe0d5f6..8ffbbe275b53eccf4e94cbb817f421521a96e635 100644 (file)
@@ -69,7 +69,7 @@ static int __init get_iommu_msi_capabilities(u8 bus, u8 dev, u8 func,
     return 0;
 }
 
-int __init get_iommu_capabilities(u8 bus, u8 dev, u8 func, u8 cap_ptr,
+static int __init get_iommu_capabilities(u8 bus, u8 dev, u8 func, u8 cap_ptr,
                                   struct amd_iommu *iommu)
 {
     u32 cap_header, cap_range, misc_info;
index 57ae3ce192c3e0590661f707302a8d14d087c211..62775d5a22d39f1d2787f85f7528019dfb69bb88 100644 (file)
@@ -508,7 +508,7 @@ static int set_iommu_interrupt_handler(struct amd_iommu *iommu)
     return irq;
 }
 
-void enable_iommu(struct amd_iommu *iommu)
+static void enable_iommu(struct amd_iommu *iommu)
 {
     unsigned long flags;
 
@@ -596,7 +596,7 @@ static int __init allocate_event_log(struct amd_iommu *iommu)
     return (allocate_iommu_table_struct(&iommu->event_log, "Event Log"));
 }
 
-int __init amd_iommu_init_one(struct amd_iommu *iommu)
+static int __init amd_iommu_init_one(struct amd_iommu *iommu)
 {
     if ( allocate_cmd_buffer(iommu) != 0 )
         goto error_out;
index 4d6bcc2acf5eae6dc3429333bafe6632a8a39deb..6bd64f9556d000a0d9b0dae25cb16fd3a5a0e329 100644 (file)
@@ -404,16 +404,6 @@ void invalidate_dev_table_entry(struct amd_iommu *iommu,
     send_iommu_command(iommu, cmd);
 }
 
-int amd_iommu_is_dte_page_translation_valid(u32 *entry)
-{
-    return (get_field_from_reg_u32(entry[0],
-                                   IOMMU_DEV_TABLE_VALID_MASK,
-                                   IOMMU_DEV_TABLE_VALID_SHIFT) &&
-            get_field_from_reg_u32(entry[0],
-                                   IOMMU_DEV_TABLE_TRANSLATION_VALID_MASK,
-                                   IOMMU_DEV_TABLE_TRANSLATION_VALID_SHIFT));
-}
-
 static u64 iommu_l2e_from_pfn(struct page_info *table, int level,
                               unsigned long io_pfn)
 {
index 059142ec0a3bafdc114875e06b86f59031d40e1c..b4ab696243c2a06de1bc495a158146a4e0e54413 100644 (file)
@@ -97,7 +97,7 @@ static int init_apic_pin_2_ir_idx(void)
     return 0;
 }
 
-u16 apicid_to_bdf(int apic_id)
+static u16 apicid_to_bdf(int apic_id)
 {
     struct acpi_drhd_unit *drhd = ioapic_to_drhd(apic_id);
     struct acpi_ioapic_unit *acpi_ioapic_unit;
index 9cbd17742cfdbdb51d0fd7839ee7978d12cf66b5..157acfc24e3acbd5a6ee3f12b4b17ae55fe82dc4 100644 (file)
@@ -495,7 +495,7 @@ static int inline iommu_flush_iotlb_psi(
                         flush_non_present_entry, flush_dev_iotlb);
 }
 
-void iommu_flush_all(void)
+static void iommu_flush_all(void)
 {
     struct acpi_drhd_unit *drhd;
     struct iommu *iommu;
@@ -1385,7 +1385,7 @@ void iommu_domain_teardown(struct domain *d)
     iommu_domid_release(d);
 }
 
-int intel_iommu_map_page(
+static int intel_iommu_map_page(
     struct domain *d, unsigned long gfn, unsigned long mfn)
 {
     struct hvm_iommu *hd = domain_hvm_iommu(d);
@@ -1446,7 +1446,7 @@ int intel_iommu_map_page(
     return 0;
 }
 
-int intel_iommu_unmap_page(struct domain *d, unsigned long gfn)
+static int intel_iommu_unmap_page(struct domain *d, unsigned long gfn)
 {
     struct acpi_drhd_unit *drhd;
     struct iommu *iommu;
@@ -1822,7 +1822,7 @@ int device_assigned(u8 bus, u8 devfn)
     return 0;
 }
 
-int intel_iommu_assign_device(struct domain *d, u8 bus, u8 devfn)
+static int intel_iommu_assign_device(struct domain *d, u8 bus, u8 devfn)
 {
     struct acpi_rmrr_unit *rmrr;
     int ret = 0, i;
@@ -1884,7 +1884,7 @@ static int intel_iommu_group_id(u8 bus, u8 devfn)
 }
 
 static u32 iommu_state[MAX_IOMMUS][MAX_IOMMU_REGS];
-void vtd_suspend(void)
+static void vtd_suspend(void)
 {
     struct acpi_drhd_unit *drhd;
     struct iommu *iommu;
@@ -1923,7 +1923,7 @@ void vtd_suspend(void)
     }
 }
 
-void vtd_resume(void)
+static void vtd_resume(void)
 {
     struct acpi_drhd_unit *drhd;
     struct iommu *iommu;
index 21cb68c9dcf515927d5a1931149e768cc538db56..fe24863f966b4737860ead17d06ec8772c52947e 100644 (file)
@@ -332,7 +332,7 @@ int queue_invalidate_iec(struct iommu *iommu, u8 granu, u8 im, u16 iidx)
     return ret;
 }
 
-int __iommu_flush_iec(struct iommu *iommu, u8 granu, u8 im, u16 iidx)
+static int __iommu_flush_iec(struct iommu *iommu, u8 granu, u8 im, u16 iidx)
 {
     int ret;
     ret = queue_invalidate_iec(iommu, granu, im, iidx);
index 9df5ccb1931a474d8d939152aef8bb822019a20a..0056da7e6a9f505eb473d2de7f22cbac4854a3a9 100644 (file)
@@ -225,4 +225,6 @@ struct msg_address {
        __u32   hi_address;
 } __attribute__ ((packed));
 
+void msi_compose_msg(struct pci_dev *pdev, int irq,
+                            struct msi_msg *msg);
 #endif /* __ASM_MSI_H */
index 40ab1cc386c7041df270f96bc5767e1d9afd5617..9d760eb59a506f379804255572388e542ff66d60 100644 (file)
@@ -64,6 +64,7 @@ struct xenoprof {
 #endif
 
 struct domain;
+int is_passive(struct domain *d);
 void free_xenoprof_pages(struct domain *d);
 
 int do_xenoprof_op(int op, XEN_GUEST_HANDLE(void) arg);